home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / ttlps / form1.frm next >
Text File  |  1999-08-17  |  2KB  |  62 lines

  1. VERSION 5.00
  2. Object = "{6F89921C-2487-11D3-8F85-000000000000}#4.0#0"; "TTLPhotoSlide.ocx"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Slide Test"
  5.    ClientHeight    =   2520
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   2520
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   2520
  11.    ScaleWidth      =   2520
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin TTLPhotoSlide.TTLSlide TTLSlide1 
  14.       Height          =   2500
  15.       Left            =   0
  16.       TabIndex        =   0
  17.       Top             =   0
  18.       Width           =   2500
  19.       _ExtentX        =   4419
  20.       _ExtentY        =   4419
  21.       BackColor       =   8421504
  22.    End
  23. End
  24. Attribute VB_Name = "Form1"
  25. Attribute VB_GlobalNameSpace = False
  26. Attribute VB_Creatable = False
  27. Attribute VB_PredeclaredId = True
  28. Attribute VB_Exposed = False
  29. Option Explicit
  30.  
  31. Private Sub Form_Load()
  32.     Dim iReturn As Integer              '* Return 0 Error loading Image
  33.     Dim strImg As String                '* Dir and File (Image) Name
  34.     Dim PushSlide As Boolean            '* Change Slide By: True = Push and Pull
  35.                                         '*                  False = New Over Old
  36.     PushSlide = False                   '* Change Over
  37.     
  38.     '* You can put your code here to load mulyiple images for a slide show.
  39.     
  40.     strImg = App.Path & "\PinkLotus.jpg"
  41.     iReturn = TTLSlide1.LoadImage(strImg, PushSlide)
  42. End Sub
  43.  
  44. Private Sub Form_Resize()
  45.  
  46. On Error GoTo ResizeErr                 '* Ignor Error msg from window when hide slide window
  47.  
  48.     With TTLSlide1
  49.         .Height = Me.Height - 425
  50.         .Width = Me.Width - 50
  51.         If .Height > .Width Then
  52.             .Height = .Width
  53.         Else
  54.             .Width = .Height
  55.         End If
  56.         .Refresh
  57.     End With
  58.  
  59. ResizeErr:
  60.     Exit Sub
  61. End Sub
  62.